load("@npm//:defs.bzl", "npm_link_all_packages")
load("@npm//pkg/ui/workspaces/e2e-tests:eslint/package_json.bzl", eslint_bin = "bin")

npm_link_all_packages(name = "node_modules")

eslint_bin.eslint_test(
    name = "lint",
    args = [
        "--ext .ts",
        "-c",
        ".eslintrc.json",
        "cypress",
        "cypress.config.ts",
    ],
    chdir = package_name(),
    data = [
        ".eslintrc.json",
        "cypress.config.ts",
        ":node_modules",
        "//pkg/ui/workspaces/eslint-plugin-crdb",
    ] + glob(
        include = [
            "cypress/e2e/**",
            "cypress/support/**",
        ],
    ),
)
